package xyz.heyaoshare.core.controller.system.user.vo.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import xyz.heyaoshare.core.enums.system.user.UserGenderEnum;
import xyz.heyaoshare.validation.validator.InEnum;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;

/**
 * 用户更新请求对象
 * @author YueHe
 * @version 0.0.1
 * @since 2025/5/9 下午3:32
 */
@Data
@Schema(description = "更新用户请求对象")
public class UserUpdateReqVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull(message = "用户ID不能为空")
    @Schema(description = "用户ID", requiredMode = REQUIRED)
    private Long id;

    @NotBlank(message = "姓名不能为空")
    @Length(max = 50, message = "姓名长度不能超过{max}字符")
    @Schema(description = "姓名", requiredMode = REQUIRED)
    private String nickname;

    @Length(max = 11, message = "手机号长度不能超过{max}字符")
    @Schema(description = "手机号")
    private String mobile;

    @Length(max = 50, message = "邮箱长度不能超过{max}字符")
    @Schema(description = "邮箱")
    private String email;

    @InEnum(UserGenderEnum.class)
    @Schema(description = "性别【1男，2女】")
    private Integer gender;

    @Schema(description = "角色ID列表")
    private List<Long> roleIds;

}